package info.heidao.ww2.common.constants;

import lombok.Getter;

/**
 * 基础web响应
 */
@Getter
public enum WebErrorInfoEnum {
    /**
     *
     */
    SUCCESS(200, "Success"),
    BAD_REQUEST(400, "参数错误，或参数格式错误"),
    AUTHORIZATION_ERROR(401, "认证已失效，请关闭窗口重新登录"),
    TO_MANY_REQUESTS(400, "同一时间请求数过多，请稍后访问"),
    NOT_FOUND_RESOURCES(404, "资源找不到"),
    METHOD_NOT_ALLOWED(405, "资源对应该方法不支持"),
    UNKNOWN_ERROR(500, "服务内部错误，请检查日志");

    WebErrorInfoEnum(int httpStatus, String msg) {
        this.httpStatus = httpStatus;
        this.msg = msg;
    }

    private int httpStatus;

    private String msg;

}
